#ifndef _LJMU_DX10_TEX_H_
#define _LJMU_DX10_TEX_H_

//Include the Direct X 10 and Direct X 10 X Header Files
#include <d3d10.h>
#include <d3dx10.h>
#include <string>

/*************************************
* Class to represent a Direct X 
* 10 Texture Object as a Resource
* View to be used in conjunction
* with Vertex and Pixel Shaders
*
* AUTHOR :  CHRIS CARTER
*************************************/
class LJMUUtilTexture
{
	public:
		//------------CONSTRUCTORS AND DESTRUCTORS-----------------------------
		LJMUUtilTexture(): _obj_tex(NULL){}											//Default Constructor: Sets our Texture to Null
		~LJMUUtilTexture(){}														//Default Destructor: Empty as we have a cleanup method.

		//------------ACCESSORS/MUTATORS---------------------------------------
		ID3D10ShaderResourceView* getTexture();										//Returns the Pointer to our Texture as a Shader Resource View.

		//------------PUBLIC METHODS-------------------------------------------
		bool initialise(ID3D10Device* pdevice,std::wstring ptexturefilelocation);	//Load the given texture file using the DX10 Device.
		void cleanup();																//Clean up the Memory Associated With This Texture.

private:
		//------------INTERNAL FIELDS------------------------------------------
		ID3D10ShaderResourceView* _obj_tex;											//Pointer to the Texture as a DX10 Shader Resource View.
};

//----------------INLINE GETTERS-------------------------------------------
	
/*****************************************
*  Returns a Pointer to our Texture Instance
*  as a DX10 Shader Resource View
*****************************************/
inline ID3D10ShaderResourceView* LJMUUtilTexture::getTexture()
{
	return this->_obj_tex;
}

#endif